import trainingPlatform from './trainingPlatform.js'
import specialTrainPlatform from './speTrainPlatform'
import itsinghuaPlatform from './itsinghuaPlatform'
import Cookies from 'js-cookie'
var _default = {
    '院系': '院系'
}
//培训平台
if(Cookies.get('platform_id') == 8){
    Object.assign(_default, trainingPlatform)
}

//判断域名
if( /www\.itsinghua\.com|home\.itsinghua\.com/g.test(window.location.host)  || /sec\.yuketang\.cn/g.test(window.location.host) || /testtdc\.xuetangonline\.com/g.test(window.location.host)){
    Object.assign(_default, specialTrainPlatform);
}

//只定制修改这两个平台的“学期”文案
if( /www\.itsinghua\.com|home\.itsinghua\.com/g.test(window.location.host) || /testtdc\.xuetangonline\.com/g.test(window.location.host)){
    Object.assign(_default, itsinghuaPlatform);
}


const custom = {
    getKey: (str) => {
        return _default[str] || str;
    }
}

export default custom;